package org.example.project

import org.example.project.cache.AndroidDatabaseDriverFactory
import org.example.project.network.SpaceXApi
import org.koin.dsl.module
import org.koin.core.module.dsl.viewModel

val appModule = module {
    single<SpaceXApi> { SpaceXApi() }
    single<SpaceXSDK> {
        SpaceXSDK(
            databaseDriverFactory = AndroidDatabaseDriverFactory(get()),
            api = get()
        )
    }

    viewModel{ RocketLaunchViewModel(get()) }

}